import request2 from '@/utils/request2'
import { qualityApiUrl, safetyApiUrl } from '../config'

export default {
  findListByMain(data, params) {
    return request2({
      url: safetyApiUrl + '/danger-meet/findListByMain', method: 'post', params, data
    })
  },
  ///danger-meet/findListByMainId/{dangerMeetId}
  // 基本信息--详情
  findListByMainId(data, params) {
    return request2({
      url: safetyApiUrl + '/danger-meet/findListByMainId/' + params.id, method: 'get', params, data
    })
  },
  createByMain(data, params) {
    return request2({
      url: safetyApiUrl + '/danger-meet/createByMain', method: 'post', params, data
    })
  },
  editByMain(data, params) {
    return request2({
      url: safetyApiUrl + '/danger-meet/editByMain', method: 'post', params, data
    })
  },
  deleteByMain(data, params) {
    return request2({
      url: safetyApiUrl + '/danger-meet/deleteByMain', method: 'post', params, data
    })
  },
  createByDetail(data, params) {
    return request2({
      url: safetyApiUrl + '/danger-meet/createByDetail', method: 'post', params, data
    })
  },
  deleteByDetailList(data, params) {
    return request2({
      url: safetyApiUrl + '/danger-meet/deleteByDetailList', method: 'post', params, data
    })
  },
  editByDetail(data, params) {
    return request2({
      url: safetyApiUrl + '/danger-meet/editByDetail', method: 'post', params, data
    })
  },
  exportLastMonth(data, params) {
    return request2({
      url: safetyApiUrl + '/danger-meet/exportLastMonth/' + params.dangerMeetId, method: 'get', params, data
    })
  },
  findListByDetails(data, params) {
    return request2({
      url: safetyApiUrl + '/danger-meet/findListByDetails', method: 'post', params, data
    })
  },
  meetSignList(data, params) {
    return request2({
      url: safetyApiUrl + '/danger-meet/meetSignList/' + params.dangerMeetId, method: 'get', params, data
    })
  },
  getExtraList(data, params) {
    return request2({
      url: safetyApiUrl + '/danger-meet/getExtraList/' + params.dangerMeetId, method: 'get', params, data
    })
  },
  addExtra(data, params) {
    return request2({
      url: safetyApiUrl + '/danger-meet/addExtra', method: 'post', params, data
    })
  },
  printDetails(data, params) {
    return request2({
      url: safetyApiUrl + '/danger-meet/printDetails/' + params.dangerMeetId, method: 'get', params, data
    })
  },
  printExtra(data, params) {
    return request2({
      url: safetyApiUrl + '/danger-meet/printExtra/' + params.dangerMeetId, method: 'get', params, data
    })
  },
  selectMeetConfig(data, params) {
    return request2({
      url: safetyApiUrl + '/danger-meet/selectMeetConfig/' + params.dangerMeetId, method: 'get', params, data
    })
  },
  ///danger-meet/chenkBaseIdent/{projectId}基本信息--判断当前是项目全周期还是月度
  chenkBaseIdent(data, params) {
    return request2({
      url: safetyApiUrl + '/danger-meet/chenkBaseIdent/' + params.projectId, method: 'get', params, data
    })
  },
  //分包责任区域
  subPackArea(data, params) {
    return request2({
      url: qualityApiUrl + '/universal/duty-area/set/sub-item', method: 'get', params, data
    })
  },
  typesLabel(data, params) {
    return request2({
      url: safetyApiUrl + '/quality/types-label/list', method: 'get', params, data
    })
  }

}
